"use strict"; (() => { var exports = {}; exports.id = 9319; exports.ids = [9319,64820]; exports.modules = { /***/ 43439: /***/ ((module, __webpack_exports__, __webpack_require__) => { __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ pageWrapperTemplate), /* harmony export */ "getServerSideProps": () => (/* binding */ getServerSideProps), /* harmony export */ "getStaticPaths": () => (/* binding */ getStaticPaths), /* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps) /* harmony export */ }); /* harmony import */ var _sentry_server_config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96270); /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58097); /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20997); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16689); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71853); /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _components_Collection_CollectionDetailContainer_CollectionDetailContainer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45865); /* harmony import */ var _utils_eventLogger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(55943); /* harmony import */ var src_utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(13830); /* harmony import */ var src_utils_chapter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(95892); /* harmony import */ var types_CollectionSortOptions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(6059); var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_components_Collection_CollectionDetailContainer_CollectionDetailContainer__WEBPACK_IMPORTED_MODULE_5__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_6__]); ([_components_Collection_CollectionDetailContainer_CollectionDetailContainer__WEBPACK_IMPORTED_MODULE_5__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_6__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__); const CollectionDetailPage = ()=>{ const router = (0,next_router__WEBPACK_IMPORTED_MODULE_4__.useRouter)(); const { 0: sortBy , 1: setSortBy } = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(types_CollectionSortOptions__WEBPACK_IMPORTED_MODULE_9__/* .CollectionDetailSortOption.VerseKey */ .l.VerseKey); const onSortByChange = (newSortByVal)=>{ (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_6__/* .logValueChange */ .Q8)("collection_detail_page_sort_by", sortBy, newSortByVal); setSortBy(newSortByVal); }; const collectionId = router.query.collectionId; /** * Get the SWR key for cursor based pagination * - when the page index is still 0 (first fetch). the get the bookmarkByCollection url without `cursor` param * - on the next fetch, add `cursor` to the parameters * * corner case * - when previous fetch contains empty data, stop fetching * - when the user is logged out, don't fetch the data * * Reference: https://swr.vercel.app/docs/pagination#useswrinfinite * * @returns {string} swr key */ const getKey = (pageIndex, previousPageData)=>{ if (previousPageData && !previousPageData.data) return null; if (pageIndex === 0) { return (0,src_utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_7__/* .makeGetBookmarkByCollectionId */ .Ix)(collectionId, { sortBy }); } const cursor = previousPageData.pagination?.endCursor; return (0,src_utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_7__/* .makeGetBookmarkByCollectionId */ .Ix)(collectionId, { sortBy, cursor }); }; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_Collection_CollectionDetailContainer_CollectionDetailContainer__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, { sortBy: sortBy, getSWRKey: getKey, onSortByChange: onSortByChange }); }; const getStaticProps$1 = async ({ locale })=>{ const allChaptersData = await (0,src_utils_chapter__WEBPACK_IMPORTED_MODULE_8__/* .getAllChaptersData */ .T4)(locale); return { props: { chaptersData: allChaptersData } }; }; const getStaticPaths = async ()=>({ paths: [], fallback: "blocking" }); var serverComponentModule = /*#__PURE__*/Object.freeze({ __proto__: null, getStaticProps: getStaticProps$1, getStaticPaths: getStaticPaths, 'default': CollectionDetailPage }); /* * This file is a template for the code which will be substituted when our webpack loader handles non-API files in the * `pages/` directory. * * We use `__SENTRY_WRAPPING_TARGET_FILE__.cjs` as a placeholder for the path to the file being wrapped. Because it's not a real package, * this causes both TS and ESLint to complain, hence the pragma comments below. */ const userPageModule = serverComponentModule ; const pageComponent = userPageModule ? userPageModule.default : undefined; const origGetInitialProps = pageComponent ? pageComponent.getInitialProps : undefined; const origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined; const origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined; // eslint-disable-next-line @typescript-eslint/no-explicit-any const getInitialPropsWrappers = { '/_app': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapAppGetInitialPropsWithSentry, '/_document': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapDocumentGetInitialPropsWithSentry, '/_error': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapErrorGetInitialPropsWithSentry, }; const getInitialPropsWrapper = getInitialPropsWrappers['/collections/[collectionId]'] || _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetInitialPropsWithSentry; if (pageComponent && typeof origGetInitialProps === 'function') { pageComponent.getInitialProps = getInitialPropsWrapper(origGetInitialProps) ; } const getStaticProps = typeof origGetStaticProps === 'function' ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetStaticPropsWithSentry(origGetStaticProps, '/collections/[collectionId]') : undefined; const getServerSideProps = typeof origGetServerSideProps === 'function' ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetServerSidePropsWithSentry(origGetServerSideProps, '/collections/[collectionId]') : undefined; const pageWrapperTemplate = pageComponent ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapPageComponentWithSentry(pageComponent ) : pageComponent; __webpack_async_result__(); } catch(e) { __webpack_async_result__(e); } }); /***/ }), /***/ 75184: /***/ ((module) => { module.exports = require("@reduxjs/toolkit"); /***/ }), /***/ 58097: /***/ ((module) => { module.exports = require("@sentry/nextjs"); /***/ }), /***/ 59003: /***/ ((module) => { module.exports = require("classnames"); /***/ }), /***/ 59606: /***/ ((module) => { module.exports = require("humps"); /***/ }), /***/ 12372: /***/ ((module) => { module.exports = require("lodash/findKey"); /***/ }), /***/ 98492: /***/ ((module) => { module.exports = require("lodash/groupBy"); /***/ }), /***/ 35526: /***/ ((module) => { module.exports = require("lodash/random"); /***/ }), /***/ 64042: /***/ ((module) => { module.exports = require("lodash/range"); /***/ }), /***/ 16641: /***/ ((module) => { module.exports = require("next-seo"); /***/ }), /***/ 60866: /***/ ((module) => { module.exports = require("next-translate/useTranslation"); /***/ }), /***/ 3280: /***/ ((module) => { module.exports = require("next/dist/shared/lib/app-router-context.js"); /***/ }), /***/ 92796: /***/ ((module) => { module.exports = require("next/dist/shared/lib/head-manager-context.js"); /***/ }), /***/ 3539: /***/ ((module) => { module.exports = require("next/dist/shared/lib/i18n/detect-domain-locale.js"); /***/ }), /***/ 34014: /***/ ((module) => { module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js"); /***/ }), /***/ 78524: /***/ ((module) => { module.exports = require("next/dist/shared/lib/is-plain-object.js"); /***/ }), /***/ 78020: /***/ ((module) => { module.exports = require("next/dist/shared/lib/mitt.js"); /***/ }), /***/ 64406: /***/ ((module) => { module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js"); /***/ }), /***/ 24964: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router-context.js"); /***/ }), /***/ 93431: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/add-locale.js"); /***/ }), /***/ 11751: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js"); /***/ }), /***/ 46220: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/compare-states.js"); /***/ }), /***/ 10299: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js"); /***/ }), /***/ 23938: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/format-url.js"); /***/ }), /***/ 29565: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js"); /***/ }), /***/ 35789: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js"); /***/ }), /***/ 1897: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/is-bot.js"); /***/ }), /***/ 1428: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js"); /***/ }), /***/ 28854: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/parse-path.js"); /***/ }), /***/ 91292: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js"); /***/ }), /***/ 34567: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js"); /***/ }), /***/ 80979: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/querystring.js"); /***/ }), /***/ 93297: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js"); /***/ }), /***/ 36052: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js"); /***/ }), /***/ 84226: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js"); /***/ }), /***/ 95052: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/route-regex.js"); /***/ }), /***/ 59232: /***/ ((module) => { module.exports = require("next/dist/shared/lib/utils.js"); /***/ }), /***/ 71853: /***/ ((module) => { module.exports = require("next/router"); /***/ }), /***/ 16689: /***/ ((module) => { module.exports = require("react"); /***/ }), /***/ 6022: /***/ ((module) => { module.exports = require("react-redux"); /***/ }), /***/ 20997: /***/ ((module) => { module.exports = require("react/jsx-runtime"); /***/ }), /***/ 52648: /***/ ((module) => { module.exports = require("refresh-fetch"); /***/ }), /***/ 74973: /***/ ((module) => { module.exports = import("@radix-ui/react-collapsible");; /***/ }), /***/ 77715: /***/ ((module) => { module.exports = import("@radix-ui/react-dialog");; /***/ }), /***/ 31481: /***/ ((module) => { module.exports = import("@radix-ui/react-dropdown-menu");; /***/ }), /***/ 66704: /***/ ((module) => { module.exports = import("@radix-ui/react-tooltip");; /***/ }), /***/ 88813: /***/ ((module) => { module.exports = import("firebase/compat/analytics");; /***/ }), /***/ 33773: /***/ ((module) => { module.exports = import("firebase/compat/app");; /***/ }), /***/ 3590: /***/ ((module) => { module.exports = import("react-toastify");; /***/ }), /***/ 79847: /***/ ((module) => { module.exports = import("swr/immutable");; /***/ }), /***/ 91448: /***/ ((module) => { module.exports = import("swr/infinite");; /***/ }), /***/ 63477: /***/ ((module) => { module.exports = require("querystring"); /***/ }) }; ; // load runtime var __webpack_require__ = require("../../webpack-runtime.js"); __webpack_require__.C(exports); var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) var __webpack_exports__ = __webpack_require__.X(0, [11497,79165,96270,24709,57933,61239,25869,50497,76410,79717,13830,37883,12951,36049,85949,62093,99163,5639,46570,57072,67972,50373,47658,45865], () => (__webpack_exec__(43439))); module.exports = __webpack_exports__; })(); //# sourceMappingURL=[collectionId].js.map